home *** CD-ROM | disk | FTP | other *** search
/ Backpacker 1 (Norsk) / backpacker.iso / pc / data / misc / bpk.dxr / 00202_MakeTempLists for loaded games New 950610.ls < prev    next >
Encoding:
Text File  |  1995-02-28  |  1.3 KB  |  59 lines

  1. on MakeTempLists
  2.   global tAction, tTWNS, tJOBS
  3.   set tTWNS to list()
  4.   set KAT_LQDS to list()
  5.   set DEST_LQDS to list()
  6.   set tJOBS to list()
  7.   repeat with i = 1 to count(tAction)
  8.     set i to i + 1
  9.     set P to getAt(tAction, i)
  10.     if stringp(P) then
  11.       if P contains "D" then
  12.         delete char 1 of P
  13.         append(tTWNS, value(P))
  14.         next repeat
  15.       end if
  16.       if P contains "K" then
  17.         delete char 1 of P
  18.         append(tJOBS, value(P))
  19.       end if
  20.     end if
  21.   end repeat
  22.   set i to count(tAction)
  23.   set LK to 0
  24.   repeat while (i > 0) and (LK < 16)
  25.     set P to getAt(tAction, i)
  26.     if stringp(P) then
  27.       if P contains "K" then
  28.         set LK to LK + 1
  29.         delete char 1 of P
  30.         append(KAT_LQDS, value(P))
  31.       end if
  32.     end if
  33.     set i to i - 1
  34.   end repeat
  35.   if count(KAT_LQDS) < 16 then
  36.     repeat with n = count(KAT_LQDS) + 1 to 16
  37.       setAt(KAT_LQDS, n, 0)
  38.     end repeat
  39.   end if
  40.   set i to count(tAction)
  41.   set LD to 0
  42.   repeat while (i > 0) and (LD < 16)
  43.     set P to getAt(tAction, i)
  44.     if stringp(P) then
  45.       if P contains "D" then
  46.         set LD to LD + 1
  47.         delete char 1 of P
  48.         append(DEST_LQDS, value(P))
  49.       end if
  50.     end if
  51.     set i to i - 1
  52.   end repeat
  53.   if count(DEST_LQDS) < 16 then
  54.     repeat with n = count(DEST_LQDS) + 1 to 16
  55.       setAt(DEST_LQDS, n, 0)
  56.     end repeat
  57.   end if
  58. end
  59.